package com.endpoint.book.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 抓取单本小说任务表
 * </p>
 *
 * @author liusp
 * @since 2025-06-21
 */
@TableName("crawl_single_task")
public class CrawlSingleTask implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 爬虫源ID
     */
    private Integer sourceId;

    /**
     * 爬虫源名
     */
    private String sourceName;

    /**
     * 源站小说ID
     */
    private String sourceBookId;

    /**
     * 分类ID
     */
    private Integer catId;

    /**
     * 爬取的小说名
     */
    private String bookName;

    /**
     * 爬取的小说作者名
     */
    private String authorName;

    /**
     * 任务状态，0：失败，1：成功，2；未执行
     */
    private Boolean taskStatus;

    /**
     * 已经执行次数，最多执行5次
     */
    private Integer excCount;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getSourceId() {
        return sourceId;
    }

    public void setSourceId(Integer sourceId) {
        this.sourceId = sourceId;
    }

    public String getSourceName() {
        return sourceName;
    }

    public void setSourceName(String sourceName) {
        this.sourceName = sourceName;
    }

    public String getSourceBookId() {
        return sourceBookId;
    }

    public void setSourceBookId(String sourceBookId) {
        this.sourceBookId = sourceBookId;
    }

    public Integer getCatId() {
        return catId;
    }

    public void setCatId(Integer catId) {
        this.catId = catId;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }

    public Boolean getTaskStatus() {
        return taskStatus;
    }

    public void setTaskStatus(Boolean taskStatus) {
        this.taskStatus = taskStatus;
    }

    public Integer getExcCount() {
        return excCount;
    }

    public void setExcCount(Integer excCount) {
        this.excCount = excCount;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "CrawlSingleTask{" +
        "id=" + id +
        ", sourceId=" + sourceId +
        ", sourceName=" + sourceName +
        ", sourceBookId=" + sourceBookId +
        ", catId=" + catId +
        ", bookName=" + bookName +
        ", authorName=" + authorName +
        ", taskStatus=" + taskStatus +
        ", excCount=" + excCount +
        ", createTime=" + createTime +
        "}";
    }
}
